BrianK, that isn't quite mimmi's problem. mimmi says that things don't work even though mimmi specifies the full pathname of the library files.
I'm not sure from mimmi's post whether the problem is that the files themselves are not found, or whether the files are found but the symbols aren't found.
mimmi, for future reference, it is
always a good idea to paste the exact text of the error message(s) into your question. It's also a good idea to be as specific as you can (without including megabytes of source code).
I have just whipped up the following sample, which works. Maybe it can help you figure out what went wrong.
Code:
#!/bin/sh
rm -rf wje*
cat > wje1.cpp <<EOD
#include <stdio.h>
void function2();
void function3();
int main(void)
{
printf("Hello, world!\n");
function2();
function3();
return 0;
} /* main() */
EOD
cat > wje2.cpp <<EOD
#include<stdio.h>
void function2(void)
{
printf("This is function2().\n");
}
EOD
cat > wje3.cpp <<EOD
#include<stdio.h>
void function3(void)
{
printf("This is function3().\n");
}
EOD
gcc wje2.cpp -c
gcc wje3.cpp -c
ar -r wje.a wje2.o
ar -r wje.a wje3.o
gcc wje1.cpp wje.a -lstdc++ -o wje1
wje1
The output of that shell script (
better not name it something which begins with wje) is:
Code:
Hello, world!
This is function2().
This is function3().
Hope this helps.