Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Linking errors
Goto page 1, 2  Next
 
Post new topic   Reply to topic Printable version
 View previous topic  forum problem <_These Post :: Post Goodbye  View next topic  
Author Message
Quan Chi2
Member of "Sexy Teenagers that Code" Group
Member of


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 860
Location: NYC
Offline

PostPosted: Sat Nov 12, 2005 7:19 pm   Post maybe stupid    Post subject: Linking errors Reply to topic Reply with quote

What am I doing wrong? Excuse me if my C++ is bad. Im just trying to test WritePrivateProfileString.


Code: Show/Hide

#include <iostream>
#include "windows.h"

using namespace std;
//#pragma warning (disable : 4430)

int Fertigo()

WritePrivateProfileString("Stuff","1","You better wash the duck!","stuff.ini");
      {
         cout << "Stuff has been successfully written as a list.";
      }
      return 0;
}

void Menue()
{
   cout << "\nThis is a test program ued to write a list of stuff to do.\n";
   cout << "1 You better wash the duck!";
}

int read()
{
   int WriteIt;

   Menue();

   cout << "Choose your pick you punk! "; cin >> WriteIt;
   
   switch( WriteIt )
   {
   case 1 : Fertigo();
   }
   return 0;
}



I keep getting this:
Quote:

--------------------Configuration: Test - Win32 Debug--------------------
Compiling...
Test.cpp
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Test.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

Test.exe - 2 error(s), 0 warning(s)


Heh, I just copied most of the code from another program Im doing..


Last edited by Quan Chi2 on Sat Nov 12, 2005 8:24 pm, edited 2 times in total
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Donkano
Server Help Squatter


Gender:Gender:Male
Joined: Jul 02 2003
Posts: 763
Offline

PostPosted: Sat Nov 12, 2005 7:37 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

You have no function labelled, "main".
Ex.
int main()
void main()
Back to top
View users profile Send private message Add User to Ignore List
(Deactived B l a h e r)
BiLinux User
I can take it both ways


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 341
Location: East Sparta, Ohio
Offline

PostPosted: Sat Nov 12, 2005 7:39 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Wow Quan is finally programming. I'de give you whats wrong but I have rpoblems understanding the stupid compilers debug output. Maybe if you use GNU it might be able to understand better on it telling you which line or where exactly the problem is but this sounds like a problem in the compile it's self or maybe in your "int Main" or void. It's kind of said you had to copy that easy of a program from another program.

P.s For some reason My msg is like right of Quan's post I think there is somthing wrong with this lay-out.
Back to top
View users profile Send private message Add User to Ignore List Send email
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Sat Nov 12, 2005 7:50 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Once you get it working, don't forget...

If you do not prefix your INI file names with ".\\", then Windows will look for it or create it in the Windows folder.
_________________
4,691 irradiated haggis!
Back to top
View users profile Send private message Add User to Ignore List
Donkano
Server Help Squatter


Gender:Gender:Male
Joined: Jul 02 2003
Posts: 763
Offline

PostPosted: Sat Nov 12, 2005 7:54 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Mr Ekted wrote:
Once you get it working, don't forget...

If you do not prefix your INI file names with ".\\", then Windows will look for it or create it in the Windows folder.


Ya, that is the shitty thing with windows cause their directory browsing through programming is the pits. Yay for Linux!
Back to top
View users profile Send private message Add User to Ignore List
(Deactived B l a h e r)
BiLinux User
I can take it both ways


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 341
Location: East Sparta, Ohio
Offline

PostPosted: Sat Nov 12, 2005 7:58 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Donkano wrote:
[..]



Ya, that is the shitty thing with windows cause their directory browsing through programming is the pits. Yay for Linux!


Awww! The great conserversity over Programing and Windows directory. I spent a whole chapter in my Dummys book about reading about the poblems it can cause along with the /'s factors.
Back to top
View users profile Send private message Add User to Ignore List Send email
Quan Chi2
Member of "Sexy Teenagers that Code" Group
Member of


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 860
Location: NYC
Offline

PostPosted: Sat Nov 12, 2005 8:04 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

lol blah-er, you mean its kind of sad that I have to copy and paste? lol Its not sad when its my own code from my own program.. or is it? tongue.gif I just wanted to do it quickly so I could get to what my main goal is to accomplish.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
(Deactived B l a h e r)
BiLinux User
I can take it both ways


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 341
Location: East Sparta, Ohio
Offline

PostPosted: Sat Nov 12, 2005 8:07 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Quan Chi2 wrote:
lol blah-er, you mean its kind of sad that I have to copy and paste? lol Its not sad when its my own code from my own program.. or is it? tongue.gif I just wanted to do it quickly so I could get to what my main goal is to accomplish.

Lol I thought you ment you took it from sombody eles program and put it in your own if you wanted a template like that.
Back to top
View users profile Send private message Add User to Ignore List Send email
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Sat Nov 12, 2005 8:58 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Donkano, even in Linux some actions default to a directory if nothing else was explicitly provided.
Please, don't "yay" Linux without knowing what you're talking about.
Spending 5 minutes in a Linux environment doesn't make you a guru or anything. icon_confused.gif
Back to top
View users profile Send private message Add User to Ignore List
(Deactived B l a h e r)
BiLinux User
I can take it both ways


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 341
Location: East Sparta, Ohio
Offline

PostPosted: Sat Nov 12, 2005 9:11 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Solo Ace wrote:
Donkano, even in Linux some actions default to a directory if nothing else was explicitly provided.
Please, don't "yay" Linux without knowing what you're talking about.
Spending 5 minutes in a Linux environment doesn't make you a guru or anything. icon_confused.gif

What are you talking about Unix, and Linux are OSs for gods. Every body has the right to priase them. And if your about to say I have no experience in them think again. I've worked with a Unix shell (Free BDS) multipual of times for a thing called IRC and EggDrop. I also used to have Linux as a OS but I needed more home type OS with a little better GUI then Unix.
Back to top
View users profile Send private message Add User to Ignore List Send email
Quan Chi2
Member of "Sexy Teenagers that Code" Group
Member of


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 860
Location: NYC
Offline

PostPosted: Sat Nov 12, 2005 9:14 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

lol, but, can we kinda stay on topic icon_wink.gif

I just need to know what I did wrong in the code lol i'll look it up some more
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
(Deactived B l a h e r)
BiLinux User
I can take it both ways


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 341
Location: East Sparta, Ohio
Offline

PostPosted: Sat Nov 12, 2005 9:20 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Quan Chi2 wrote:
lol, but, can we kinda stay on topic icon_wink.gif

I just need to know what I did wrong in the code lol i'll look it up some more
There is somthing wrong with you int main or void as sugested on the first two replies. I'de tell you what exactly you need to put but I'm sketchy with my "main".
Back to top
View users profile Send private message Add User to Ignore List Send email
Quan Chi2
Member of "Sexy Teenagers that Code" Group
Member of


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 860
Location: NYC
Offline

PostPosted: Sat Nov 12, 2005 10:03 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Problem solved. icon_smile.gif

I didn't make a main function.

Code: Show/Hide

#include <iostream>
#include "windows.h"

using namespace std;
//#pragma warning (disable : 4430)

int main()
{
      WritePrivateProfileString("Stuff","1","You better wash the duck!",".\\stuff.ini");
      {
         cout << "Stuff has been successfully written as a list.";
      }
      system("PAUSE");
}

void Menue()
{
   cout << "\nThis is a test program ued to write a list of stuff to do.\n";
   cout << "1 You better wash the duck!";
}

int read()
{
   int WriteIt;

   Menue();

   cout << "Choose your pick you punk! "; cin >> WriteIt;
   
   switch( WriteIt )
   {
   case 1 : main();
   }
   return 0;
}


Heh, lesson learned. I didn't know main was so important lol.

http://support.microsoft.com/?scid=kb;en-us;291952&spid=3042&sid=220

That explained it. tongue.gif
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Muskrat
Server Help Squatter


Age:38
Joined: Aug 24 2004
Posts: 829
Location: Swamp
Offline

PostPosted: Sat Nov 12, 2005 11:52 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

blah-er wrote:
a thing called IRC and EggDrop.
I think Solo is going to have a field day with this.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Sun Nov 13, 2005 12:01 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Quan Chi2 wrote:
Problem solved. icon_smile.gif


Well, not quite. Now you have a main, but your Menue() and read() functions don't ever do anything (in case you expected them to).
Back to top
View users profile Send private message Add User to Ignore List
Quan Chi2
Member of "Sexy Teenagers that Code" Group
Member of


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 860
Location: NYC
Offline

PostPosted: Sun Nov 13, 2005 7:48 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Yea, I notcide that, thing is it writes.. so Im happy. I mixed everything up tongue.gif
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
(Deactived B l a h e r)
BiLinux User
I can take it both ways


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 341
Location: East Sparta, Ohio
Offline

PostPosted: Sun Nov 13, 2005 8:11 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Muskrat wrote:
[..]

I think Solo is going to have a field day with this.

He'll have to learn Pearl if he's to understand Eggdrop. http://eggheads.org/ should be of help and there's alittle explination on what IRC is and *BDS (Maybe he'll get confused that there is a SunOS lol). You can learn what IRC is at http://chatspike.net/index.php?z=5 and how it works is you'll have to do a google search on this one because I don't have any good sites on it besides talking to the friend (also the owner of chatspike). Have a nice field day icon_smile.gif Solo!
Back to top
View users profile Send private message Add User to Ignore List Send email
Quan Chi2
Member of "Sexy Teenagers that Code" Group
Member of


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 860
Location: NYC
Offline

PostPosted: Sun Nov 13, 2005 8:15 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Heh, I didn't have to copy/paste the entire code anyway.. I didn't look at it properly doing things in a rush lol tongue.gif

All I needed was this.

Code: Show/Hide

#include <iostream>
#include "windows.h"

using namespace std;

int main()
{
      WritePrivateProfileString("Stuff","1","You better wash the duck!",".\\stuff.ini");
      WritePrivateProfileString("Stuff","2","Food!",".\\stuff.ini");
      WritePrivateProfileString("Stuff","3","MMMMM Good!",".\\stuff.ini");
      WritePrivateProfileString("Stuff","4","Stupid head!",".\\stuff.ini");
      {
         cout << "Stuff has been successfully written as a list.\n";
      }
      return 10;
}


heh heh.. tongue.gif
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Sun Nov 13, 2005 8:40 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

I used IRC before you were born, blah-er, silly troll.

I'd actually prefer Python since it's the language I'm currently using, but thanks, I know some PERL already.

If you're promoting Linux, then do it in the right way, don't start giving out wrong ideas about the differences between Windows and Linux when they're not true.
He's the same guy who tried to tell us Linux runs on UNIX.
When promoting something make sure you're promoting it the right way.

Oh and blah-er, it's called "BSD", get it right.
Back to top
View users profile Send private message Add User to Ignore List
(Deactived B l a h e r)
BiLinux User
I can take it both ways


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 341
Location: East Sparta, Ohio
Offline

PostPosted: Sun Nov 13, 2005 9:02 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Solo Ace wrote:
I used IRC before you were born, blah-er, silly troll.

I'd actually prefer Python since it's the language I'm currently using, but thanks, I know some PERL already.

If you're promoting Linux, then do it in the right way, don't start giving out wrong ideas about the differences between Windows and Linux when they're not true.
He's the same guy who tried to tell us Linux runs on UNIX.
When promoting something make sure you're promoting it the right way.

Oh and blah-er, it's called "BSD", get it right.

Wow you were 3 or 2 when you started IRC. Thank you for reading my post for once this time. Ok I agree with you on the promoting Linux. Thank you for correcting me Look down below at my Sig tongue.gif. BTW You missed me spelling Perl wrong as Pearl. Now to decide to ignore you from now on your keeping the chance to feed off of you every time you step into my comments and trying to make me seem foolish?
Back to top
View users profile Send private message Add User to Ignore List Send email
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Sun Nov 13, 2005 9:20 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

I do read your posts, you just have a problem saying what you mean in a proper way.

I have signatures turned off.
I have you on ignore since 2 weeks or so, but I decided to make you look more stupid than you already did by yourself, and obviously I did a good job.
Back to top
View users profile Send private message Add User to Ignore List
newb
Turds are yummy
Turds are yummy


Age:33
Gender:Gender:Male
Joined: Mar 15 2005
Posts: 1267
Location: England
Offline

PostPosted: Sun Nov 13, 2005 9:22 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

You are foolish.
_________________
Haha SpecShip
Back to top
View users profile Send private message Add User to Ignore List Send email MSN Messenger
(Deactived B l a h e r)
BiLinux User
I can take it both ways


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 341
Location: East Sparta, Ohio
Offline

PostPosted: Sun Nov 13, 2005 9:23 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Ya I'm deciding Ignored read my post http://forums.minegoboom.com/viewtopic.php?p=52338#52338
Back to top
View users profile Send private message Add User to Ignore List Send email
newb
Turds are yummy
Turds are yummy


Age:33
Gender:Gender:Male
Joined: Mar 15 2005
Posts: 1267
Location: England
Offline

PostPosted: Sun Nov 13, 2005 9:40 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Yeah, read it again.
Back to top
View users profile Send private message Add User to Ignore List Send email MSN Messenger
Quan Chi2
Member of "Sexy Teenagers that Code" Group
Member of


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 860
Location: NYC
Offline

PostPosted: Sun Nov 13, 2005 10:34 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

This topic should be locked.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Trash Talk All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 107 page(s) served in previous 5 minutes.

phpBB Created this page in 0.682258 seconds : 49 queries executed (73.9%): GZIP compression disabled