• Advertisement
Sign in to follow this  

problem with using ftgl bitmap

This topic is 4720 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i can compile my project w/o using the ftgl fonts (with libs). But as soon as i declare a font, like this...
FTGLBitmapFont *font = new FTGLBitmapFont("C:/Windows/Fonts/Arial.ttf");


i get all these errors
Deleting intermediate files and output files for project 'Maia - Win32 Debug'.
--------------------Configuration: Maia - Win32 Debug--------------------
Compiling...
ARB_Multisample.cpp
BMP.cpp
cUI.cpp
DrawScene.cpp
IsExtSupported.c
Maia.cpp
TGALoader.cpp
Linking...
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strncpy already defined in LIBCD.lib(strncpy.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in LIBCD.lib(dbgheap.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _realloc already defined in LIBCD.lib(dbgheap.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _free already defined in LIBCD.lib(dbgheap.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in LIBCD.lib(fclose.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _fread already defined in LIBCD.lib(fread.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _fseek already defined in LIBCD.lib(fseek.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _ftell already defined in LIBCD.lib(ftell.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _fopen already defined in LIBCD.lib(fopen.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strncmp already defined in LIBC.lib(strncmp.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _isdigit already defined in LIBCD.lib(_ctype.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _atol already defined in LIBCD.lib(atox.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _memmove already defined in LIBCD.lib(memmove.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _sprintf already defined in LIBCD.lib(sprintf.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _isxdigit already defined in LIBCD.lib(_ctype.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _isalnum already defined in LIBCD.lib(_ctype.obj)
LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
LIBCD.lib(crt0init.obj) : warning LNK4098: defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4049: locally defined symbol ""public: __thiscall FTGLBitmapFont::FTGLBitmapFont(char const *)" (??0FTGLBitmapFont@@QAE@PBD@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: virtual __thiscall FTGLBitmapFont::~FTGLBitmapFont(void)" (??1FTGLBitmapFont@@UAE@XZ)" imported
ftgl_static.lib(FTBitmapGlyph.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
ftgl_static.lib(FTBitmapGlyph.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
freetype219.lib(cff.obj) : error LNK2001: unresolved external symbol ___security_cookie
freetype219.lib(type1.obj) : error LNK2001: unresolved external symbol ___security_cookie
freetype219.lib(autohint.obj) : error LNK2001: unresolved external symbol ___security_cookie
freetype219.lib(ftbase.obj) : error LNK2001: unresolved external symbol ___security_cookie
freetype219.lib(psmodule.obj) : error LNK2001: unresolved external symbol ___security_cookie
freetype219.lib(bdf.obj) : error LNK2001: unresolved external symbol ___security_cookie
freetype219.lib(type1cid.obj) : error LNK2001: unresolved external symbol ___security_cookie
freetype219.lib(cff.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
freetype219.lib(type1.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
freetype219.lib(autohint.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
freetype219.lib(ftbase.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
freetype219.lib(psmodule.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
freetype219.lib(bdf.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
freetype219.lib(type1cid.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
Debug/Maia.exe : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.

Maia.exe - 33 error(s), 4 warning(s)


i have no idea why it does this. Any help would be great thx jake

Share this post


Link to post
Share on other sites
Advertisement
i am not really sure but try this :
1) delete all the files in your Debug floder.
2) link the libraries by this code
#pragma comment(lib, "library_name.lib")
in your code make sure the library you want to load it te be in the same floder
3)go to Project->Setting->Link->"Project Options" and put this line
/nodefaultlib:"LIBC"
this line used if you use multi-threading
that's all
i hope it works with you

Share this post


Link to post
Share on other sites
ok i did what u said and i still get some crazy errors. And im not using multithreading (computer sux to much).


--------------------Configuration: Maia - Win32 Debug--------------------
Compiling...
cUI.cpp
Linking...
LINK : warning LNK4049: locally defined symbol ""public: __thiscall FTGLBitmapFont::FTGLBitmapFont(char const *)" (??0FTGLBitmapFont@@QAE@PBD@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: virtual __thiscall FTGLBitmapFont::~FTGLBitmapFont(void)" (??1FTGLBitmapFont@@UAE@XZ)" imported
LINK : warning LNK4049: locally defined symbol "_strncpy" imported
LINK : warning LNK4049: locally defined symbol "_malloc" imported
LINK : warning LNK4049: locally defined symbol "_realloc" imported
LINK : warning LNK4049: locally defined symbol "_free" imported
LINK : warning LNK4049: locally defined symbol "_fclose" imported
LINK : warning LNK4049: locally defined symbol "_fread" imported
LINK : warning LNK4049: locally defined symbol "_fseek" imported
LINK : warning LNK4049: locally defined symbol "_ftell" imported
LINK : warning LNK4049: locally defined symbol "_fopen" imported
LINK : warning LNK4049: locally defined symbol "_strncmp" imported
LINK : warning LNK4049: locally defined symbol "_isdigit" imported
LINK : warning LNK4049: locally defined symbol "_atol" imported
LINK : warning LNK4049: locally defined symbol "_memmove" imported
LINK : warning LNK4049: locally defined symbol "_sprintf" imported
LINK : warning LNK4049: locally defined symbol "_isxdigit" imported
LINK : warning LNK4049: locally defined symbol "_isalnum" imported
ftgl_static.lib(FTBitmapGlyph.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
ftgl_static.lib(FTBitmapGlyph.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
freetype219.lib(ftbase.obj) : error LNK2001: unresolved external symbol __imp__longjmp
freetype219.lib(smooth.obj) : error LNK2001: unresolved external symbol __imp__longjmp
freetype219.lib(ftbase.obj) : error LNK2001: unresolved external symbol __imp__strrchr
freetype219.lib(cff.obj) : error LNK2001: unresolved external symbol ___security_cookie
freetype219.lib(type1.obj) : error LNK2001: unresolved external symbol ___security_cookie
freetype219.lib(autohint.obj) : error LNK2001: unresolved external symbol ___security_cookie
freetype219.lib(ftbase.obj) : error LNK2001: unresolved external symbol ___security_cookie
freetype219.lib(psmodule.obj) : error LNK2001: unresolved external symbol ___security_cookie
freetype219.lib(bdf.obj) : error LNK2001: unresolved external symbol ___security_cookie
freetype219.lib(type1cid.obj) : error LNK2001: unresolved external symbol ___security_cookie
freetype219.lib(cff.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
freetype219.lib(type1.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
freetype219.lib(autohint.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
freetype219.lib(ftbase.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
freetype219.lib(psmodule.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
freetype219.lib(bdf.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
freetype219.lib(type1cid.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
freetype219.lib(bdf.obj) : error LNK2001: unresolved external symbol __imp__qsort
freetype219.lib(cff.obj) : error LNK2001: unresolved external symbol __imp__qsort
freetype219.lib(type1.obj) : error LNK2001: unresolved external symbol __imp__qsort
freetype219.lib(pfr.obj) : error LNK2001: unresolved external symbol __imp__qsort
freetype219.lib(sfnt.obj) : error LNK2001: unresolved external symbol __imp__qsort
freetype219.lib(psmodule.obj) : error LNK2001: unresolved external symbol __imp__qsort
freetype219.lib(psaux.obj) : error LNK2001: unresolved external symbol __imp__qsort
Debug/Maia.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.

Maia.exe - 27 error(s), 18 warning(s)

Share this post


Link to post
Share on other sites
After a little [google]ing
Be sure to read the thread linked in the second post. I'm not sure if that will get rid of the longjmp or qsort link errors, but give it a try.

I would also second Sinbad's (from that forum) suggestion and upgrade from VS6, they have a real crappy compiler.

EDIT: Make sure you are a linking to the single-threaded ftgl and freetype libs and that your run-time library setting is set to single-threaded (in VS.NET it's in project settings - c/c++ - code generation... it should be something similar to that in VS6).

Share this post


Link to post
Share on other sites
well i dled the sp6 thing and it still dont work. I also have the .net disc somewhere in my house but i dont no much about .net? Is .net same language as just normal visual studio 6.0? If it is i guess ill try it then and see how it goes.

Share this post


Link to post
Share on other sites
Quote:
Original post by jake_Ghost
well i dled the sp6 thing and it still dont work. I also have the .net disc somewhere in my house but i dont no much about .net? Is .net same language as just normal visual studio 6.0? If it is i guess ill try it then and see how it goes.


Visual Studio is just an IDE. In my opinion VS.NET's IDE is more intuitive than VS6. It will take a little getting used to coming from VS6, but they are pretty similar. The language is C++ (using visual c++ that is, as opposed to visual basic for example), it has nothing to do with Microsoft or Visual Studio. Now, the compilers are a different story. VS6 came out around the time C++ was still being standardized, so it's compiler is not very standards compliant and doesn't optimize very well. VS.NET's compiler is 98% standards compliant (or so I've heard) and is much better at optimizing. VS6 isn't even being supported anymore.

So in short, run far, far away from VS6 and install VS.NET as quickly as possible.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement