Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: abraker95 on January 05, 2011, 04:12:08 am

Title: Linking error
Post by: abraker95 on January 05, 2011, 04:12:08 am
I'm trying to compile a library, and I am getting a link time error. People said that the code compiles in
Visual C++ just fine, but Code::Blocks has a problem.

The error is undefined reference to `_strtoui64(char const*, char**, int)'
That function is declared in stdio.h

Please help ASAP!!! :(
Title: Re: Linking error
Post by: ollydbg on January 05, 2011, 04:25:47 am
You need to supply more information and ask a smart question.
Here is my mild guess :D
If you use VC++ compiler in Codeblocks, I think this is not a problem.
I suppose you use MinGW, so these two compilers may have different header files.
Title: Re: Linking error
Post by: abraker95 on January 05, 2011, 04:53:58 am
I'm trying to make a dll out of the Raknet library, and it gives me a linktime error. I don't think it's the header file(s) since stdio.h is a standard C header. Yes I'm using MinGW. How can a standard C library have linking problems?
Title: Re: Linking error
Post by: xunxun on January 05, 2011, 06:29:44 am
I'm trying to make a dll out of the Raknet library, and it gives me a linktime error. I don't think it's the header file(s) since stdio.h is a standard C header. Yes I'm using MinGW. How can a standard C library have linking problems?

No, on MinGW, strtoui64 is defined in "stdlib.h", not "stdio.h".
Title: Re: Linking error
Post by: abraker95 on January 05, 2011, 02:11:24 pm
I looked at http://msdn.microsoft.com/en-us/library/85zk715d(v=vs.80).aspx and it like there areGeneric-Text Routine Mappings(???) Would declaring the wrong one cause the error?
Title: Re: Linking error
Post by: stahta01 on January 05, 2011, 06:49:24 pm
Turn on Full Compiler Logging for your Compiler!
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

Then find a site that supports C/C+ programming questions.
Ask your programming questions on that site.
This Code::Blocks Web-Site is for C::B related questions; not C/C++ programming questions.

Tim S.