| | |
Dll's and problems with them
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2006
Posts: 164
Reputation:
Solved Threads: 3
Hey guys, I was writing code or DLL's (doubly linked lists) and I think I have everything right but it keeps giving me a makefile error. My code is below along with the error log. ANy help would be apprecaited.
Error Log:
Compiler: Default compiler
Building Makefile: "C:\Documents and Settings\My Documents\C++\Lab06\Makefile.win"
Executing make...
make.exe -f "C:\Documents and Settings\My Documents\C++\Lab06\Makefile.win" all
g++.exe DLLNode.o -o "Lab06.exe" -L"C:/Dev-Cpp/lib"
C:/Dev-Cpp/lib/libmingw32.a(main.o)(.text+0x106):main.c: undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
make.exe: *** [Lab06.exe] Error 1
Execution terminated
C++ Syntax (Toggle Plain Text)
//DLLNode.h #include <iostream> #include <cstdlib> #ifndef DOUBLY_LINKED_LIST #define DOUBLY_LINKED_LIST template<class T> class IntDLLNode { public: IntDLLNode(); IntDLLNode(const T&,IntDLLNode*,IntDLLNode*); protected: T info; IntDLLNode *next,*prev; }; #endif
C++ Syntax (Toggle Plain Text)
//DLLNode.cpp #include "DLLNode.h" template<class T> IntDLLNode<T>::IntDLLNode() { next = prev = NULL; } template<class T> IntDLLNode<T>::IntDLLNode(const T& el,IntDLLNode *n = NULL,IntDLLNode *p = NULL) { info = el; next = n; prev = p; }
Error Log:
Compiler: Default compiler
Building Makefile: "C:\Documents and Settings\My Documents\C++\Lab06\Makefile.win"
Executing make...
make.exe -f "C:\Documents and Settings\My Documents\C++\Lab06\Makefile.win" all
g++.exe DLLNode.o -o "Lab06.exe" -L"C:/Dev-Cpp/lib"
C:/Dev-Cpp/lib/libmingw32.a(main.o)(.text+0x106):main.c: undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
make.exe: *** [Lab06.exe] Error 1
Execution terminated
All dlls must have DllMain(). This is the code generated by M$ VC++ compiler when creating a dll project.
C++ Syntax (Toggle Plain Text)
BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; }
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Similar Threads
- Internet Explorer has encountered a problem and needs to close - when I close IE (Windows NT / 2000 / XP)
- SYSTEM.INI missing on WIN 98 SE (Windows 95 / 98 / Me)
- Trojan Problem - Hijackthis log posted (Viruses, Spyware and other Nasties)
- i'm having dll problems (Windows Software)
- ppsuz.dll pop-up problems (Viruses, Spyware and other Nasties)
- Please Analyze My HijackThis Logfile, I'm having "bridge.dll" problems at least. (Viruses, Spyware and other Nasties)
- Problem Bridge.dll error & Freeze at Desktop (Viruses, Spyware and other Nasties)
Other Threads in the C++ Forum
- Previous Thread: what is undeclared identifier
- Next Thread: Need help with counting " Y" as a vowel
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion count database delete deploy desktop developer directshow dll dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph homeworkhelp homeworkhelper iamthwee ifstream input int integer lib linkedlist linux list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






