begin process at 2010 02 10 12:15:22
  Trouver un code source :
 
dans
 
Accueil > Forum > 

Archive C/C++

 > 

Archives

 > 

Au secours

 > 

Problème compilation avec Dev C++


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

Problème compilation avec Dev C++

vendredi 30 juillet 2004 à 16:44:53 | Problème compilation avec Dev C++

AMokers

Bonjours,
Voila quand je compile mon programme, j'obtient ca :

Compilateur: Default compiler
Exécution de g++.exe...
g++.exe "C:\Dev-Cpp\Projets\Tetrinet\main.cpp" -o "C:\Dev-Cpp\Projets\Tetrinet\main.exe" -I"C:\Dev-Cpp\include\c++" -I"C:\Dev-Cpp\include\c++\mingw32" -I"C:\Dev-Cpp\include\c++\backward" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
C:/Dev-Cpp/Projets/Tetrinet/main.cpp: In function `BOOL MainDlg(HWND__*,
unsigned int, unsigned int, long int)':
C:/Dev-Cpp/Projets/Tetrinet/main.cpp:83: warning: passing NULL used for
non-pointer argument passing 3 of `LONG RegCreateKeyExA(HKEY__*, const
CHAR*, long unsigned int, CHAR*, long unsigned int, long unsigned int,
_SECURITY_ATTRIBUTES*, HKEY__**, DWORD*)'
C:/Dev-Cpp/Projets/Tetrinet/main.cpp:83: warning: argument to non-pointer type
`long unsigned int' from NULL
C:/Dev-Cpp/Projets/Tetrinet/main.cpp:83: warning: passing NULL used for
non-pointer argument passing 5 of `LONG RegCreateKeyExA(HKEY__*, const

CHAR*, long unsigned int, CHAR*, long unsigned int, long unsigned int,
_SECURITY_ATTRIBUTES*, HKEY__**, DWORD*)'
C:/Dev-Cpp/Projets/Tetrinet/main.cpp:83: warning: argument to non-pointer type
`long unsigned int' from NULL
C:/Dev-Cpp/Projets/Tetrinet/main.cpp:135: warning: comparison is always false
due to limited range of data type

C:/Dev-Cpp/Projets/Tetrinet/main.cpp:248: warning: passing NULL used for
non-pointer argument passing 3 of `LONG RegCreateKeyExA(HKEY__*, const
CHAR*, long unsigned int, CHAR*, long unsigned int, long unsigned int,
_SECURITY_ATTRIBUTES*, HKEY__**, DWORD*)'
C:/Dev-Cpp/Projets/Tetrinet/main.cpp:248: warning: argument to non-pointer type
`long unsigned int' from NULL
C:/Dev-Cpp/Projets/Tetrinet/main.cpp:248: warning: passing NULL used for

non-pointer argument passing 5 of `LONG RegCreateKeyExA(HKEY__*, const
CHAR*, long unsigned int, CHAR*, long unsigned int, long unsigned int,
_SECURITY_ATTRIBUTES*, HKEY__**, DWORD*)'
C:/Dev-Cpp/Projets/Tetrinet/main.cpp:248: warning: argument to non-pointer type
`long unsigned int' from NULL
C:/Dev-Cpp/Projets/Tetrinet/main.cpp:250: warning: passing NULL used for
non-pointer argument passing 3 of `LONG RegSetValueExA(HKEY__*, const CHAR*,
long unsigned int, long unsigned int, const BYTE*, long unsigned int)'
C:/Dev-Cpp/Projets/Tetrinet/main.cpp:250: warning: argument to non-pointer type
`long unsigned int' from NULL
C:/Dev-Cpp/Projets/Tetrinet/main.cpp:252: warning: passing NULL used for
non-pointer argument passing 3 of `LONG RegSetValueExA(HKEY__*, const CHAR*,
long unsigned int, long unsigned int, const BYTE*, long unsigned int)'
C:/Dev-Cpp/Projets/Tetrinet/main.cpp:252: warning: argument to non-pointer type

`long unsigned int' from NULL
C:/Dev-Cpp/Projets/Tetrinet/main.cpp:254: warning: passing NULL used for
non-pointer argument passing 3 of `LONG RegSetValueExA(HKEY__*, const CHAR*,
long unsigned int, long unsigned int, const BYTE*, long unsigned int)'
C:/Dev-Cpp/Projets/Tetrinet/main.cpp:254: warning: argument to non-pointer type
`long unsigned int' from NULL

C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x19):main.cpp: undefined reference to `WSAStartup@8'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x90):main.cpp: undefined reference to `DeleteObject@4'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0xba):main.cpp: undefined reference to `WSACleanup@0'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x1f1):main.cpp: undefined reference to `closesocket@4'

C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x202):main.cpp: undefined reference to `closesocket@4'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x213):main.cpp: undefined reference to `closesocket@4'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x23b):main.cpp: undefined reference to `htons@4'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x252):main.cpp: undefined reference to `socket@12'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x26f):main.cpp: undefined reference to `WSAAsyncSelect@16'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x284):main.cpp: undefined reference to `bind@12'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x297):main.cpp: undefined reference to `listen@8'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x4d4):main.cpp: undefined reference to `inet_addr@4'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x4f3):main.cpp: undefined reference to `gethostbyname@4'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x564):main.cpp: undefined reference to `htons@4'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x57b):main.cpp: undefined reference to `socket@12'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x598):main.cpp: undefined reference to `WSAAsyncSelect@16'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x5ad):main.cpp: undefined reference to `connect@12'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x5bd):main.cpp: undefined reference to `WSAGetLastError@0'

C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x600):main.cpp: undefined reference to `recv@16'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x665):main.cpp: undefined reference to `send@16'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x770):main.cpp: undefined reference to `send@16'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x786):main.cpp: undefined reference to `send@16'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x811):main.cpp: undefined reference to `send@16'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x827):main.cpp: undefined reference to `send@16'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x892):main.cpp: more undefined references to `send@16' follow
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x980):main.cpp: undefined reference to `closesocket@4'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x991):main.cpp: undefined reference to `closesocket@4'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0x9de):main.cpp: undefined reference to `accept@12'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0xa03):main.cpp: undefined reference to `recv@16'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0xab1):main.cpp: undefined reference to `send@16'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0xac4):main.cpp: undefined reference to `closesocket@4'
C:\DOCUME~1\VILLEG~1\LOCALS~1\Temp/cc0ubaaa.o(.text+0xad5):main.cpp: undefined reference to `closesocket@4'

Exécution terminée



Comment je peut faire svp ?

PS : Beaucoup d'application ne marchent pas, alors que je les ai télécharger sur ce site :(

Est-ce DevC++ qui est mal configuré, comment je peut faire ?

Merci

Merci de votre aide.
--
Email := 'amokers@yahoo.fr';
ICQ := '150576014';
Site := 'www.delphi-projets.fr.st';
MSN Messenger := 'amokers@msn.com';
vendredi 30 juillet 2004 à 17:01:16 | Re : Problème compilation avec Dev C++

AlexMAN

Membre Club
il faut ke tu link ws2_32.lib ou wsock32.lib selon la version de winsock ke tu utilise (2 ou 1.1)

++
vendredi 30 juillet 2004 à 22:30:09 | Re : Problème compilation avec Dev C++

AMokers

Merci, mais comment fait-on pour rajouter ?,
Et comment savoir quelle librairie rajouter ?

Sinon je pige pas j'inclue pourtant bien winsock.h :/

Est-on obligé de faire un projet ?

Quand on ne c'est pas quelle librairie rajouter, peut ton tous les inclure ?

Merci de votre aide.
--
Email := 'amokers@yahoo.fr';
ICQ := '150576014';
Site := 'www.delphi-projets.fr.st';
MSN Messenger := 'amokers@msn.com';
vendredi 30 juillet 2004 à 22:52:02 | Re : Problème compilation avec Dev C++

AlexMAN

Membre Club
un header ne contient aucune fonction, simplement la declaration de fonctions presentes ds la lib.
Avec Devc++, je sais pas si ca marcherait, essaye ca :

#pragma comment(lib, "ws2_32.lib") //version 2
ou
#pragma comment(lib, "wsock32.lib") //version 1

sinon, il faudrait ke t'aille trifouiller ds les propriétés de linkage pour trouver komen linker une lib, car je ne conais pa trop dev c++.
Pour savoir kel version tu as utilisé, lorsk tu initialises winsock (WSAStartup je crois), si tu as fait :
MAKEWORD(1, 1) >> version 1
MAKEWORD(2, 0) >> version 2
SI tu n'as pas fait ca, tu as fait un truc du genre WSAStartup(0x202, ...); enfin a partir de mes infos, tu trouvera kel lib linker..

Voila, j'espere avoir été assez clair

++

samedi 31 juillet 2004 à 00:56:35 | Re : Problème compilation avec Dev C++

AMokers

Oui merci beaucoup, mais comment tu c'est le nom de la librairie ?

par exemple tu fais ton source, et tu as un msg d'erreur de link, comment tu c'est ce qu'il faut rajouter comme librairie ?

Merci de ton aide.

PS : tu aurais ICQ, ou msn stp ?

merci d'avance.
--
Email := 'amokers@yahoo.fr';
ICQ := '150576014';
Site := 'www.delphi-projets.fr.st';
MSN Messenger := 'amokers@msn.com';
samedi 31 juillet 2004 à 01:26:05 | Re : Problème compilation avec Dev C++

AlexMAN

Membre Club
Je connais le nom de ces libs paske j'ai eu le mm pb avec winsock, mais jne pourrais pas te citer chak lib kan mm !
Dsl pas de msn ni de ICQ, pas bavard le alexman..

++
samedi 31 juillet 2004 à 12:38:12 | Re : Problème compilation avec Dev C++

AMokers

Merci pour tout ;)
--
Email := 'amokers@yahoo.fr';
ICQ := '150576014';
Site := 'www.delphi-projets.fr.st';
MSN Messenger := 'amokers@msn.com';


Cette discussion est classée dans : long, to, cpp, main, docume


Répondre à ce message

Sujets en rapport avec ce message

c::b et socket [ par sheorogath ] bonjour voulant faire un peu de c++ pour changer je me telecharge un ide : code::blocksvoulant m'initier au socket un peu je reussi a me procurer un c Plusieurs fichiers sources [ par nisaloncaje ] ReBonjour, dans mon projet, je dispose d'un fichier main.cpp qui contient la fonction main et les déclarations de classe.Je pensais mettre, dans un fi Mais comment utiliser wxWidgets avec Code::Blocks et VC++ 7.1 toolkit ??!!! [ par zippro4012 ] Je programme en C++ dans l'éditeur Code::Blocks, et compile avec VC++ 7.1 toolkit.Il est relativement ennuyeux d'utiliser les APIs Windows pour créer code de cryptage,débutant [ par RoseX ] voila j'ai un probleme, je créé un logiciel ayant pour but de crypter un message et de le décrypter a demande. je vais dabors vous exposer mon code en Probleme avec winsock [ par ratala ] Bonjour, J'éssaye de travailler avec les winsocks mais à chaque fois que je compile, j'ai ce message d'erreur :.objs\main.o:main.cpp:(.text+0x649): un G++ [ par tekila_bandita ] Bonjour,Ben enfaite je debute en c++ mais j'ai un probleme :Je n'arrive pas à compiler un programme le plus simpliste du monde.Je crée un classe fract probleme avec string [ par slyfer07 ] Bonjour tout le monde,je débute en C++ et je suis en train de réaliser mon premier projet (j'utilise DevC++). Celui-ci comprend mon main.cpp, ainsi qu Problème avec SDL_ttf... [ par noursmarron ] Je suis désespéré et au bord du suicide lolun peu noob aussi mais bon ;)Donc je viens d'installer SDL qui marche très bien (sur code::blocks, jai essa message du compilo [ par Rjoe ] Bonjour je dois realiser un pti projet pour l'ecole mais la console me renvoie un truc main.cpp:(.text+0xd20): référence indéfinie vers « VersionDia Pb avec ld : classe template en parametre d'une méthode membre [ par mjoubert ] Bonjour à tous, Mon problème est que ld n'arrive pas lier une méthode template d'une classe non template qui a en parametre une classe template. How


Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Février 2010
LMMJVSD
1234567
891011121314
15161718192021
22232425262728

Consulter la suite du CalendriCode

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,437 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales