Unresolved externals __imp__........

Questions or HOWTOs about the above? Post 'em here...
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Post by dusti »

I think i found something wrong. I tried to print out the directory that bzflag can't find to control if its really the right directory. I found this code:

Code: Select all

// initialize font system
  FontManager &fm = FontManager::instance();
  // load fonts from data directory
  fm.loadAll(PlatformFactory::getMedia()->getMediaDirectory() + "\fonts");

  // try to get a font - only returns -1 if there are no fonts at all
  if (fm.getFaceID(BZDB.get("consoleFont")) <0>getMediaDirectory() + "\fonts");

  printFatalError("Path: " + PlatformFactory::getMedia()->getMediaDirectory()); //This line is new

  // try to get a font - only returns -1 if there are no fonts at all
  if (fm.getFaceID(BZDB.get("consoleFont")) <0>        with
1>        [
1>            _Elem=char,
1>            _Traits=std::char_traits<char>,
1>            _Ax=std::allocator<char>
1>        ]
1>        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Line 1013 is the line i added.
getMediaDirectory() should return a string, but it seems to me that it returns a std::basic_string<_Elem>. Then i tried it with:

Code: Select all

cout << "Pfad: " <<PlatformFactory>getMediaDirectory().c_str() << endl;
But this don't work, i get no errors but it doesn't print.

The preview cuts some of my text i entered out, i try to post it. if it don't work i'll post again :roll:
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Post by dusti »

it hasn't worked.
I think i found something wrong. I tried to print out the directory that bzflag can't find to control if its really the right directory. I found this code:

Code: Select all

// initialize font system
  FontManager &fm = FontManager::instance();
  // load fonts from data directory
  fm.loadAll(PlatformFactory::getMedia()->getMediaDirectory() + "\fonts");

  // try to get a font - only returns -1 if there are no fonts at all
  if (fm.getFaceID(BZDB.get("consoleFont")) <> 0) { //changed < to <to>getMediaDirectory() + "\fonts");

  printFatalError("Path: " + PlatformFactory::getMedia()->getMediaDirectory()); //This line is new

  // try to get a font - only returns -1 if there are no fonts at all
  if (fm.getFaceID(BZDB.get("consoleFont")) <0>        with
1>        [
1>            _Elem=char,
1>            _Traits=std::char_traits<char>,
1>            _Ax=std::allocator<char>
1>        ]
1>        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Line 1013 is the line i added.
getMediaDirectory() should return a string, but it seems to me that it returns a std::basic_string<_Elem>. Then i tried it with:

Code: Select all

cout << "Pfad: " <<PlatformFactory>getMediaDirectory().c_str() << endl;
But this don't work, i get no errors but it doesn't print.

Edit: it still doenst work. I don't know what's happening, but theres always the same piece of text missing. What can i do?
User avatar
blast
General
General
Posts: 4934
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Post by blast »

I fixed your posts a bit (you had an ending quote tag insead of an ending code tag). Is that what the problem was? If not, try posting the code to our pastebin instead and post the resulting link here.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Post by dusti »

No, that was because parts of the text were deleted.
Well, i postet the codes and the error message at pastebin.
Code 1 is what i found, Code 2 what i changed (just 1 line).
The link is http://pastebin.bzflag.bz/f6f602873
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

if you double click the exe that is in the root dir does it start?
ImageJeffM
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Post by dusti »

No, i get the error that no fonts were found.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

is the data dir in the same place as the bzflag.exe ? and does it contain a fonts folder with ttf fonts?
ImageJeffM
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Post by dusti »

Yes, both is right.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

then that makes no sense. something must be wrong. I know for a fact this works. If it worked when you moved the data dir into the same dir as the bzflag exe then it should also work when you move the exe to the same dir as the data dir.

Something must not be right.
ImageJeffM
User avatar
blast
General
General
Posts: 4934
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Post by blast »

Does the value specified by -directory get stored in the config file? If so, and if you used that before, that could be causing an issue now.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

that is possible, throw away your conifg file/dir
ImageJeffM
dusti
Private First Class
Private First Class
Posts: 33
Joined: Sat Mar 24, 2007 8:53 pm

Post by dusti »

There is no path in my config.cfg in the "\Documents\My BZFlag Files\2.0" directory. Can someone say me the line i have to add to specify the data directory?
If i change the name of the config.cfg in \Documents\My BZFlag Files\2.0 to config.cfg_bak and i start my bzflag.exe (already compiled) i downloaded, it creates a new config.cfg. My self compiled version don't do that.
Post Reply