Bonjour,
en migrant un projet de CodeBlocks � Visual C++ Express 2008, j'ai
eu un probl�me.
Apr�s avoir compil�, au lancement de l'executable j'ai un message d'erreur
(voir la pi�ce jointe).
L'erreur survient dans une dll, link�e de fa�on statique � l'ex�cutable.
Code : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7
8 HEAP[Lost on the Path - SFML.exe]: Invalid allocation size - CCCCCCD0 (exceeded 7ffdefff) Exception de première chance à 0x7c812aeb dans Lost on the Path - SFML.exe : Exception Microsoft C++ : std::bad_alloc à l'emplacement mémoire 0x0013f8ec.. HEAP[Lost on the Path - SFML.exe]: Invalid allocation size - CCCCCCCD (exceeded 7ffdefff) Exception de première chance à 0x7c812aeb dans Lost on the Path - SFML.exe : Exception Microsoft C++ : std::bad_alloc à l'emplacement mémoire 0x0013f28c.. Exception de première chance à 0x7c812aeb dans Lost on the Path - SFML.exe : Exception Microsoft C++ : [rethrow] à l'emplacement mémoire 0x00000000.. Exception de première chance à 0x7c812aeb dans Lost on the Path - SFML.exe : Exception Microsoft C++ : [rethrow] à l'emplacement mémoire 0x00000000.. Exception de première chance à 0x7c812aeb dans Lost on the Path - SFML.exe : Exception Microsoft C++ : [rethrow] à l'emplacement mémoire 0x00000000.. Exception non gérée à 0x7c812aeb dans Lost on the Path - SFML.exe : Exception Microsoft C++ : std::bad_alloc à l'emplacement mémoire 0x0013f28c..
Code de la DLL
L� je suis un peu perdu.
Code : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 vector<string> FileContent; vector<string> FileContent2; bool DllExport L_OpenArch(string Filename, int MemoryMode) { vector<string> *t; if (MemoryMode == LOTPFORMAT_USE_1) t = &FileContent; else t = &FileContent2; t->push_back(Filename); // CETTE Ligne provoque l'erreur return true; }
Si vous avez une id�e,
Merci
EDIT: Si je commente la ligne dans la dll, il me fait la m�me erreur, mais cette vois dans le programme.
Code : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7 sf::RenderWindow * LotPWin; int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // ICI LotPWin = new sf::RenderWindow(sf::VideoMode(1024, 768, 32), "Lost on the Path");
Partager