Accueil > Forum > > > > Error LNK2001: unresolved external symbol
Error LNK2001: unresolved external symbol
lundi 2 juin 2008 à 13:06:38 |
Error LNK2001: unresolved external symbol

OverOver
|
Bonjour, Je dois utiliser un projet c++ en tant que DLL dans Labview. J'ai donc crée une application DLL (sous Win32 Dynamic-Link Library) auquel j'ai ajouté mes codes ( sources .c et .h) Mais à la compilationun bonne cinquantaine d'erreurs du type: error LNK2001: unresolved external symbol "public: void * __thiscall Bvc::CDib::GetPixels(void)const " (?GetPixels@CDib@Bvc@@QBEPAXXZ) Pourtant j'ai bien ajouté dans Outils/Options/Directories.Include ) le programme BvcDib.h. Quelqu'un pourrait-il m'aider ??
|
|
lundi 2 juin 2008 à 13:16:21 |
Re : Error LNK2001: unresolved external symbol

Pistol_Pete
|
Salut As tu inclus la dll en question ou sont definie toutes les fonctions du style GetPixel? #pragma comment(lib,"BvcDib.dll) A+ Mon site internet : [ Lien ]
|
|
lundi 2 juin 2008 à 16:24:34 |
Re : Error LNK2001: unresolved external symbol

OverOver
|
Merci de ta réponse Pistol-Pete,
j'ai bien mis BvcDib.h dans mon programme:
#pragma once #include <AtlZoom.h> #include <BvcDib.h> #include <BvcColorConverter.h> using namespace Bvc;
Je m'explique, Au départ ce projet était destiné a visualiser une camera connecté au PC gràace à un bus 1394. Donc il renvoyait un .exe avec une fenetre windows permettant de regler les paramètres de la camera. Puis, j'ai voulu controler l'acquisition d'images grâce à un Trigger, j'ai pensé à exporter les fonctions sous forme d'une DLL manipulable avec Labview.
L'ensemble du projet marche très bien en MFC AppWizard (exe ) Mais pas quand j'ai voulu créer ma DLL avec MFCAppWizard (dll), je compile bien mais j'ai un pb d'édition de leins, d'ou l'erreur LNK2001. J'ai aussi essayé avec une Win32 Dynamic-Link Library.. mm resultat
|
|
lundi 2 juin 2008 à 17:27:39 |
Re : Error LNK2001: unresolved external symbol

Pistol_Pete
|
Ok tu as ajouter le point h, c'est un debut, ton compilo pourra savoir s'il y a des erreurs de syntaxe ou non. Mais il faut aussi indiquer ou se trouve le code de ses fonctions. Si le code correspondant a ton fichier .h se trouve dans une dll, il faut l'indiquer au compilo avec un pragma once A+ Mon site internet : [ Lien ]
|
|
mardi 3 juin 2008 à 10:56:04 |
Re : Error LNK2001: unresolved external symbol

OverOver
|
Ya pa d'erreurs, je compile l'ensemble des sources sans pb. Je crois que le pb se trouve au niveau de l'édition de liens ( d'ou LNK). Et comme je l'ai dejà dit, le projet fontionne parfaitement en sortie .exe mais pas en application DLL.
Mes fichiers .h ne se trouvent pas dans une dll, j'ai bien spécifié le chemin des .h avec pragma once.
|
|
mardi 3 juin 2008 à 18:37:24 |
Re : Error LNK2001: unresolved external symbol

juju12
|
tu peux mettre le code de la fonction qui utilise ::GetPixels()? Peut-être cela sera-t-il plus clair. D'autre part je suppose que tu as bien implémenté void * __thiscall Bvc::CDib::GetPixels(void)const dans un .c inclus au projet? bien avec le const (je demande on sait jamais)?
|
|
mardi 3 juin 2008 à 19:18:03 |
Re : Error LNK2001: unresolved external symbol

OverOver
|
merci juju pr ta réponse,
GetPixels se trouve dans bvcdib.h, comment je peux mettre le code de la fonction ??
En fait je n'arrive pas à faire le lien avec des fichiers.h: bcam.h et bvcdib.h Pourtant ils sont bien dans External dependance.
Je ne suis pas un expert en C++, mais ça fait des semaines que je traine avec ça.
|
|
mardi 3 juin 2008 à 20:09:09 |
Re : Error LNK2001: unresolved external symbol

juju12
|
ouais mais attends : dans un .h t'as des déclarations, pas le contenu des fonctions; où est-il? Dans un .c ou .cpp(dans ce cas l'as-tu joint au projet) ou dans un .lib (dans ce cas l'as-tu ajouté au projet avec comme proposait Pete, #pragma comment(lib,"BvcDib.lib") ou quelque soit son nom) ou dans une dll externe? ce que je comprends pas c'est que t'arrives à compiler en exe et pas en dll t'es sûr d'avoir bien copié toutes les références entre les deux (pas seulement les .h mais aussi les .lib, dans directories.library) ?
|
|
mercredi 4 juin 2008 à 09:42:20 |
Re : Error LNK2001: unresolved external symbol

OverOver
|
Juju12, j'ai bien BvcDib.h et Bcam.h dans le repertoire INC/ Mais dans LIB/ je ne vois que BcamApiAtl7.lib, BcamApiMfc7.lib, BvcDibAtl.lib et BcvDibMfr7.lib
Est-ce normal que je n'ai pas Bcam.lib et BvcDib.lib ??
Et pourquoi ça marcherait avec un .exe ?
Je vous copie la liste d'erreur:
Compiling... MainFrame.cpp stdafx.cpp StoreAVI.cpp Linking... MainFrame.obj : error LNK2001: unresolved external symbol "public: __thiscall Bcam::BcamException::BcamException(unsigned long,class WTL::CString,char * *)" (??0BcamException@Bcam@@QAE@KVCString@WTL@@PAPAD@Z) MainFrame.obj : error LNK2001: unresolved external symbol "public: void __thiscall Bcam::CBcam::CContinuousShot::operator=(bool)" (??4CContinuousShot@CBcam@Bcam@@QAEX_N@Z) MainFrame.obj : error LNK2001: unresolved external symbol "public: void __thiscall Bcam::CBcam::GrabImageAsync(void *,unsigned int,void *,bool)" (?GrabImageAsync@CBcam@Bcam@@QAEXPAXI0_N@Z) MainFrame.obj : error LNK2001: unresolved external symbol "public: void * __thiscall Bvc::CDib::GetPixels(void)const " (?GetPixels@CDib@Bvc@@QBEPAXXZ) MainFrame.obj : error LNK2001: unresolved external symbol "public: unsigned long __thiscall Bcam::CBcam::AllocateResources(unsigned long,unsigned long,unsigned long)" (?AllocateResources@CBcam@Bcam@@QAEKKKK@Z) MainFrame.obj : error LNK2001: unresolved external symbol "public: void __thiscall Bcam::CBcam::CFormatSeven::_FormatSeven::CBytePerPacket::operator=(unsigned long)" (??4CBytePerPacket@_FormatSeven@CFormatSeven@CBcam@Bcam@@QAEXK@Z) MainFrame.obj : error LNK2001: unresolved external symbol "public: unsigned long __thiscall Bcam::CBcam::CFormatSeven::_FormatSeven::CBytePerPacket::Max(void)" (?Max@CBytePerPacket@_FormatSeven@CFormatSeven@CBcam@Bcam@@QAEKXZ) MainFrame.obj : error LNK2001: unresolved external symbol "public: void __thiscall Bcam::CBcam::CFormatSeven::_FormatSeven::CImageSize::operator=(class WTL::CSize)" (??4CImageSize@_FormatSeven@CFormatSeven@CBcam@Bcam@@QAEXVCSize@WTL@@@Z) MainFrame.obj : error LNK2001: unresolved external symbol "public: void __thiscall Bcam::CBcam::CFormatSeven::_FormatSeven::CImagePosition::operator=(class WTL::CPoint)" (??4CImagePosition@_FormatSeven@CFormatSeven@CBcam@Bcam@@QAEXVCPoint@WTL@@@Z) MainFrame.obj : error LNK2001: unresolved external symbol "public: class WTL::CSize __thiscall Bcam::CBcam::CFormatSeven::_FormatSeven::MaxSize(void)" (?MaxSize@_FormatSeven@CFormatSeven@CBcam@Bcam@@QAE?AVCSize@WTL@@XZ) MainFrame.obj : error LNK2001: unresolved external symbol "public: class WTL::CString __thiscall Bcam::CBcam::CInfo::ModelName(void)" (?ModelName@CInfo@CBcam@Bcam@@QAE?AVCString@WTL@@XZ) MainFrame.obj : error LNK2001: unresolved external symbol "public: class WTL::CString __thiscall Bcam::CBcam::CInfo::NodeId(void)" (?NodeId@CInfo@CBcam@Bcam@@QAE?AVCString@WTL@@XZ) MainFrame.obj : error LNK2001: unresolved external symbol "public: void __thiscall Bcam::CBcam::CFormatSeven::_FormatSeven::CColorCoding::operator=(enum _DCS_COLOR_CODES)" (??4CColorCoding@_FormatSeven@CFormatSeven@CBcam@Bcam@@QAEXW4_DCS_COLOR_CODES @@@Z) MainFrame.obj : error LNK2001: unresolved external symbol "public: void __thiscall Bcam::CBcam::SetVideoMode(enum Bcam::DCSVideoFormat,enum Bcam::DCSVideoMode,enum Bcam::DCSVideoFrameRate)" (?SetVideoMode@CBcam@Bcam@@QAEXW4DCSVideoFormat@2@W4DCSVide oMode@2@W4DCSVideoFrameRate@2@@Z) MainFrame.obj : error LNK2001: unresolved external symbol "public: void __thiscall Bcam::CBcam::Open(class WTL::CString,struct HWND__ *)" (?Open@CBcam@Bcam@@QAEXVCString@WTL@@PAUHWND__@@@Z) MainFrame.obj : error LNK2001: unresolved external symbol "public: static class std::list<class WTL::CString,class std::allocator<class WTL::CString> > __cdecl Bcam::CBcam::DeviceNames(void)" (?DeviceNames@CBcam@Bcam@@SA?AV?$list@VCString@WTL@@V?$a llocator@VCString@WTL@@@std@@@std@@XZ) MainFrame.obj : error LNK2001: unresolved external symbol _AVIFileExit@0 MainFrame.obj : error LNK2001: unresolved external symbol _AVIFileRelease@4 MainFrame.obj : error LNK2001: unresolved external symbol _AVIStreamWrite@32 MainFrame.obj : error LNK2001: unresolved external symbol "public: unsigned long __thiscall Bvc::CDib::GetWidthBytes(void)const " (?GetWidthBytes@CDib@Bvc@@QBEKXZ) MainFrame.obj : error LNK2001: unresolved external symbol "public: void __thiscall Bvc::CDib::GetSize(class WTL::CSize *)const " (?GetSize@CDib@Bvc@@QBEXPAVCSize@WTL@@@Z) StoreAVI.obj : error LNK2001: unresolved external symbol "public: void __thiscall Bvc::CDib::GetSize(class WTL::CSize *)const " (?GetSize@CDib@Bvc@@QBEXPAVCSize@WTL@@@Z) MainFrame.obj : error LNK2001: unresolved external symbol "public: enum Bvc::CDib::Orientation_t __thiscall Bvc::CDib::GetOrientation(void)const " (?GetOrientation@CDib@Bvc@@QBE?AW4Orientation_t@12@XZ) MainFrame.obj : error LNK2001: unresolved external symbol "public: void __thiscall Bcam::CBcam::WaitForCompletion(enum Bcam::FunctionCode_t *,unsigned long *,void * *,unsigned long)" (?WaitForCompletion@CBcam@Bcam@@QAEXPAW4FunctionCode_t@2@PAKPAPAXK @Z) MainFrame.obj : error LNK2001: unresolved external symbol _AVIStreamSetFormat@16 MainFrame.obj : error LNK2001: unresolved external symbol "public: class Bvc::CDib * __thiscall Bvc::CDib::Clone(bool)const " (?Clone@CDib@Bvc@@QBEPAV12@_N@Z) MainFrame.obj : error LNK2001: unresolved external symbol "public: void __thiscall Bvc::CDib::GetBitmapInfo(struct tagBITMAPINFO * *,unsigned long *)const " (?GetBitmapInfo@CDib@Bvc@@QBEXPAPAUtagBITMAPINFO@@PAK@Z) MainFrame.obj : error LNK2001: unresolved external symbol _AVIStreamRelease@4 MainFrame.obj : error LNK2001: unresolved external symbol _AVIMakeCompressedStream@16 MainFrame.obj : error LNK2001: unresolved external symbol _AVISaveOptions@20 MainFrame.obj : error LNK2001: unresolved external symbol _AVIFileCreateStreamA@12 MainFrame.obj : error LNK2001: unresolved external symbol "public: class WTL::CSize __thiscall Bvc::CDib::GetSize(void)const " (?GetSize@CDib@Bvc@@QBE?AVCSize@WTL@@XZ) MainFrame.obj : error LNK2001: unresolved external symbol "public: unsigned long __thiscall Bvc::CDib::GetTotalPixelBytes(void)const " (?GetTotalPixelBytes@CDib@Bvc@@QBEKXZ) MainFrame.obj : error LNK2001: unresolved external symbol _AVIFileOpenA@16 MainFrame.obj : error LNK2001: unresolved external symbol _AVIFileInit@0 MainFrame.obj : error LNK2001: unresolved external symbol "public: void __thiscall Bcam::CBcam::Notify(enum Bcam::FunctionCode_t,void *)" (?Notify@CBcam@Bcam@@QAEXW4FunctionCode_t@2@PAX@Z) MainFrame.obj : error LNK2001: unresolved external symbol "public: void __thiscall Bcam::CBcam::Close(void)" (?Close@CBcam@Bcam@@QAEXXZ) MainFrame.obj : error LNK2001: unresolved external symbol "public: void __thiscall Bvc::CDib::StoreBMP(class WTL::CString)const " (?StoreBMP@CDib@Bvc@@QBEXVCString@WTL@@@Z) MainFrame.obj : error LNK2001: unresolved external symbol "public: void __thiscall Bvc::CDib::CopyToClipboard(void)" (?CopyToClipboard@CDib@Bvc@@QAEXXZ) MainFrame.obj : error LNK2001: unresolved external symbol "protected: static class Bvc::CDib * __cdecl Bvc::CDib::Create(class WTL::CSize,unsigned int,enum Bvc::CDib::Orientation_t,enum Bvc::CDib::PaletteType_t)" (?Create@CDib@Bvc@@KAPAV12@VCSize@WT L@@IW4Orientation_t@12@W4PaletteType_t@12@@Z) MainFrame.obj : error LNK2001: unresolved external symbol "protected: static class Bvc::CDib * __cdecl Bvc::CDib::LoadBMP(class WTL::CString)" (?LoadBMP@CDib@Bvc@@KAPAV12@VCString@WTL@@@Z) MainFrame.obj : error LNK2001: unresolved external symbol "protected: void __thiscall Bvc::CDib::Release(void)" (?Release@CDib@Bvc@@IAEXXZ) StoreAVI.obj : error LNK2001: unresolved external symbol "protected: void __thiscall Bvc::CDib::Release(void)" (?Release@CDib@Bvc@@IAEXXZ) MainFrame.obj : error LNK2001: unresolved external symbol "public: __thiscall Bvc::BvcException::BvcException(unsigned long,class WTL::CString,char * *)" (??0BvcException@Bvc@@QAE@KVCString@WTL@@PAPAD@Z) StoreAVI.obj : error LNK2001: unresolved external symbol "public: __thiscall Bvc::BvcException::BvcException(unsigned long,class WTL::CString,char * *)" (??0BvcException@Bvc@@QAE@KVCString@WTL@@PAPAD@Z) MainFrame.obj : error LNK2001: unresolved external symbol "protected: long __thiscall Bvc::CDib::AddRef(void)" (?AddRef@CDib@Bvc@@IAEJXZ) MainFrame.obj : error LNK2001: unresolved external symbol "public: static void __cdecl Bvc::CColorConverter::ConvertMono8ToRGB(class Bvc::CDibPtr &,class Bvc::CDibPtr const &,enum Bvc::CColorConverter::PatternOrigin_t)" (?ConvertMono8ToRGB@CColorCon verter@Bvc@@SAXAAVCDibPtr@2@ABV32@W4PatternOrigin_t@12@@Z) MainFrame.obj : error LNK2001: unresolved external symbol "public: __thiscall Bcam::BcamException::BcamException(unsigned long,class WTL::CString,void *)" (??0BcamException@Bcam@@QAE@KVCString@WTL@@PAX@Z) MainFrame.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Bcam::BcamException::FormatMessageA(class WTL::CString const &,char * *)" (?FormatMessageA@BcamException@Bcam@@MAEXABVCString@WTL@@PAPAD@Z) StoreAVI.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall Bcam::CBcam::~CBcam(void)" (??1CBcam@Bcam@@UAE@XZ) StoreAVI.obj : error LNK2001: unresolved external symbol "public: __thiscall Bcam::CBcam::CBcam(void)" (??0CBcam@Bcam@@QAE@XZ) StoreAVI.obj : error LNK2001: unresolved external symbol "public: struct HBITMAP__ * __thiscall Bvc::CDib::GetBitmapHandle(void)const " (?GetBitmapHandle@CDib@Bvc@@QBEPAUHBITMAP__@@XZ) STOREAVI5___Win32_Debug/STOREAVI5.dll : fatal error LNK1120: 49 unresolved externals Error executing link.exe. STOREAVI5.dll - 53 error(s), 0 warning(s)
|
|
mercredi 4 juin 2008 à 12:20:41 |
Re : Error LNK2001: unresolved external symbol

juju12
|
ben je suppose que tu as fait deux projets, un exe et une dll? Dans ce cas est-ce-que TOUTES les libs répertoriées (dans /LIB) dans le projet exe le sont bien également dans le projet dll? Pour BvcDib.lib non non je disais ce nom au hasard mais ça doit être les autres BvcDibFr7.lib etc...
En dernier recours si tu veux je t'enverrai mon mail par message privé, tu m'enverras tes deux projets et je regarderai;
|
|
Cette discussion est classée dans : error, lnk2001, unresolved, external, symbol
Répondre à ce message
Sujets en rapport avec ce message
gzip : erreur de linkage [ par varbool ]
Salut,Que signifient ces messages d'erreurs ?error LNK2001: unresolved external symbol _deflateerror LNK2001: unresolved external symbol _deflateInit2
error LNK2001: unresolved external symbol __imp__ntohs@4 [ par nonocpp ]
error LNK2001: unresolved external symbol __imp__ntohs@4bjr,vous avez une idée concernant le pb?Merci
Visual C++: error LNK2001: unresolved external symbol [ par oh81 ]
Bonjour, J'utilise une librairie (qui gère les sockets: DllSocket) pour faire un serveur. J'ai ajouté au projet du serveur Dllimport.h que j'ai incl
error LNK2001: unresolved external symbol _auxDIBImageLoadA@4 [ par maximol ]
salut tout le monde!!bah j'ai un programme en c++ ,cathegorie OpenGl...j'ai inclus toutes les bibliothéques mais pourtant il me donn toujours lors de
Problème de LINK avec Visual C++ :unresolved external symbol [ par gros_landais ]
Bonjour,J'ai besoin d'un server en C/C++ et je travail avec Visual C++ 6.0Lorsque je compile mon programme je n'ai pas d'erreur, mais pour le link j'a
Fx2 : Cypress CY7C68013A... Besoin d un expert visual c++ [ par no1no2 ]
Bonjour, J ai pour mission de réaliser un projet en C++ une interface permettant d enregistrer un flux de donnée avec un CPLD et d utliser un port usb
erreur link lnk2001 [ par Bestdoud ]
bonjourJ'essaye de recompiler une dllj'ia pourtant mis "C:\Program Files\Microsoft Visual Studio\MyProjects\mvcdll\JPEGLIB.lib" dans les librairy dans
[WxWidget] Probleme de Linker [ par shlomite ]
Bonjour à tous. J'ai chercher sur le web et sur le site du zéro. J'ai sans doute mal cherché, mais je n'ai pas trouvé ce que je cherchais. Voilà mon
error LNK2001: unresolved external symbol _SQLSetConnectOption VC++ [ par Eraser3d ]
Bonjour à tous,J'ai un gros problme de link en VC ++ .En compilation, je n'ai pas de probleme mais des que je veux linker j'ai se probleme. Que dois j
erreur lnk2001 en C [ par missC29 ]
Bonjour tout le monde, je suis débutanteVoilà mon problème, merci de m'aider:je travail sur visual C++ et je dois faire marcher un programme en C. ma
Livres en rapport
|
Derniers Blogs
JOYEUX ANNIVERSAIRE NIXJOYEUX ANNIVERSAIRE NIX par ebartsoft
Souhaitons un bon et joyeux anniversaire à notre hôte à tous, Nix.
Je ne le répéterais jamais assez mais sans lui rien ne serait possible. Il défit en permanence les lois de la gravité et comme il le dit si bien, si tu lui fais confiance ça devra...
Cliquez pour lire la suite de l'article par ebartsoft IMAGINE CUP 2012, MAKE A SIGN EN FINALEIMAGINE CUP 2012, MAKE A SIGN EN FINALE par junarnoalg
Voilà qui est fait, la nouvelle est officielle ! L'équipe belge "Make a Sign" va au pays des kangourous défendre son projet dans la catégorie Software Design. http://www.imaginecup.com/CompetitionsContent/Competition/WorldwideFinalists.aspx V...
Cliquez pour lire la suite de l'article par junarnoalg KINECT 1.5 IS OUT !KINECT 1.5 IS OUT ! par Vko
La version 1.5 du Kinect For Microsoft vient tout juste de sortir ! Plein de nouveautés: Tracking de squelette en Near Mode Détection en position assise Détection faciale avec un SDK dédié Documentation et des guideline (enfin) Un out...
Cliquez pour lire la suite de l'article par Vko LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) par richardc
Mise à jour des Web API du 14 Mai
Réservez dès maintenant votre journée du 20 juin pour le Windows Azure Dev Camp 2012 à Paris
Mise à jour de Team Foundation Service
MechCommander 2 sur Windows 8
Entity Framework 5 Release Candidate e...
Cliquez pour lire la suite de l'article par richardc REACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITERREACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITER par Groc
Une mauvaise utilisation de rx lors de l'écriture d'une couche d'accès à des services peut conduire à des cas embarassants avec des erreurs mal gérées, des appels qui ne partent lorsqu'ils le devraient, et même des résultats incorrects . le tout nuis...
Cliquez pour lire la suite de l'article par Groc
Logiciels
sDEVIS-FACTURES vlPRO (8.1.0.3)SDEVIS-FACTURES VLPRO (8.1.0.3)sDEVIS-FACTURES vlPRO a été mis au point pour les particuliers, créateurs, entrepreneurs, artisa... Cliquez pour télécharger sDEVIS-FACTURES vlPRO 974 Application Server (12.2.4.6)974 APPLICATION SERVER (12.2.4.6)Développez de puissantes applications dans un environnement de 'cloud computing', clusterisé, séc... Cliquez pour télécharger 974 Application Server vPicture (1.4.2.1)VPICTURE (1.4.2.1)Avec vPicture, hébergez vos images facilement et rapidement.
vPicture est un utilitaire simple, ... Cliquez pour télécharger vPicture Easy-Planning (2.2.1.6)EASY-PLANNING (2.2.1.6)Easy-Planning permet de créer des plannings sous la représentation de diagrammes et est adapté au... Cliquez pour télécharger Easy-Planning COM-BACKUP (2.0)COM-BACKUP (2.0)
COM-BACKUP est un logiciel de sauvegarde qui permet de planifier les sauvegardes de vos dossiers ...
Cliquez pour télécharger COM-BACKUP
|