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