Crystal Space
Welcome, Guest. Please login or register.
September 03, 2014, 06:34:28 am

Login with username, password and session length
Search:     Advanced search
9009 Posts in 2043 Topics by 8379 Members
Latest Member: Hamlock3
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  My argc and argv are gone! (Link error)
« previous next »
Pages: [1] Print
Author Topic: My argc and argv are gone! (Link error)  (Read 1687 times)
The Fidder
Guest
« on: May 18, 2005, 09:47:26 pm »

It's been some time since I last followed the CS scene (it was the 0.95 unstable if I recall correctly), so I decided to givce a try at a newer version. Having downloaded the current CVS snapshot, I compiled it successfully with both msys+mingw and MSVC7.1, which was a pleasant surprise! So after this, quite naturally, I decided to make a small test app.

Now, I always try to compile one of the tests that come with a library by hand (so that I can see what needs to be included, defined and linked in an app) before I try to make something of my one. For this purpose I created a new solution with msvc in a blank directory, copied the isotest header and source file, copied crystalspace's include and lib files to their respective directories in the msvc installation and, lastly, copied all preprocessor definitions, include and link options from the existing project to my own.

Compiling this gave some link errors, which were resolved after a short search through the docs (I had forgotten to link against the libcrystalspace.lib).

I happily hit the recompile button, fully expecting to have my first CS app built - but alas this was not to be Sad . There were still 2 undefined symbols in the code: __argc and __argv.

Now, if I understand correctly, CS has to do some magic to turn the int main (int argc, char *argv[]) into the correct form for each platform (for example WinMain for windows). That's fine, but I aven't been able to find out what I'm doing wrong. The docs did not mention anything on this either (or if they did I couldn't find it).

I'm stumped - does anyone know what I'm doing wrong? The same app, with the same options (as far as I can see) is built successfully during the normal CS build process. Any suggestions?
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 3.582 seconds with 13 queries.