   static Library compilation and usage trouble
  Hi,I am compiling a library with mingw gcc which has dependencies on another static library. This are my compilation commandsgcc -c kvaserlib.c kvaserlib.oar rc libkvaser.a libkvaser.oranlib libkvaser.aLater on I include this library along with the other static library to a project in an external compiler (ANSI C compliant Labwindows CVI) and try to compile a basic program... Now I'm getting Bad COFF library member header in libkvaser.aAnybody have any idea as to what might be happening?kvaserlib.h#ifndef KVASER_H#define KVASER_Hint canInitializeCommunications(unsigned int channelNumber, unsigned int flag, long bitrate, unsigned int tseg1, unsigned int tseg2, int* channelHandle);int WriteMessage(int channelHandle, long CANId, unsigned char *message, unsigned int messageLen, unsigned int messageFlag);int ReadMessage(int channelHandle, long *CANId, unsigned char **message, unsigned int *messageLen, unsigned int *messageFlag, unsigned long *timeStamp, unsigned long timeout);#endifkvaserlib.c#include <canlib.h>int canInitializeCommunications(unsigned int channelNumber, unsigned int flag, long bitrate, unsigned int tseg1, unsigned int tseg2, int* channelHandle){    //Code}int ReadMessage(int channelHandle, long *CANId, unsigned char **message, unsigned int *messageLen, unsigned int *messageFlag, unsigned long *timeStamp, unsigned long timeout){//Code} int WriteMessage(int channelHandle, long CANId, unsigned char *message, unsigned int messageLen, unsigned int messageFlag){//Code}Thank you   
Quote:Original post by TheShadowI am compiling a library with mingw gcc which has dependencies on another static library. This are my compilation commandsLater on I include this library along with the other static library to a project in an external compiler (ANSI C compliant Labwindows CVI) and try to compile a basic program... Now I'm getting Bad COFF library member header in libkvaser.aI suspect your Labwindows linker doesn't understand the AR format file generated by the ar command used by the mingw gcc toolchain.  There's no reason why it should.Try linking all the .o files generated by your mingw toolchain explicitly.  If it works, then the ar (.a) file is the problem.