S
Stefan.Wagenbrenner
Good morning,
I'm trying to write a dll using Dev Cpp 4. I'm able to compile the
following code, but the linker throws an error and no dll is produced:
#include <stdio.h>
#include <windows.h>
#include <vector>
// ... more code ...
vector<char> charSubstring (char *str, int start, int ende)
{
vector<char> subs;
for (int i=start; i<=ende; i++)
{
subs.push_back(str);
}
}
The linker tells me the following:
$_S_oom_malloc alloc template1iOUi+0x1a):maindll.cpp: undefined
reference to `endl(ostream &)`
$_S_oom_malloc alloc template1iOUi+0x1a):maindll.cpp: undefined
reference to `cerr`
$_S_oom_malloc alloc template1iOUi+0x1a):maindll.cpp: undefined
reference to `ostream:perator<<(char const *)`
gcc exited with status 1
When I use the code above in a "normal" program it works fine. Could
someone tell me what I´m doing wrong?
Thanks in advance
Stefan Wagenbrenner
I'm trying to write a dll using Dev Cpp 4. I'm able to compile the
following code, but the linker throws an error and no dll is produced:
#include <stdio.h>
#include <windows.h>
#include <vector>
// ... more code ...
vector<char> charSubstring (char *str, int start, int ende)
{
vector<char> subs;
for (int i=start; i<=ende; i++)
{
subs.push_back(str);
}
}
The linker tells me the following:
$_S_oom_malloc alloc template1iOUi+0x1a):maindll.cpp: undefined
reference to `endl(ostream &)`
$_S_oom_malloc alloc template1iOUi+0x1a):maindll.cpp: undefined
reference to `cerr`
$_S_oom_malloc alloc template1iOUi+0x1a):maindll.cpp: undefined
reference to `ostream:perator<<(char const *)`
gcc exited with status 1
When I use the code above in a "normal" program it works fine. Could
someone tell me what I´m doing wrong?
Thanks in advance
Stefan Wagenbrenner