link Fehler
-
Hallo zusammen,
ich hab ein kleines Problem (VC++ Express 2008).Folgende Datei-Struktur führt zu Fehlern beim linken:
in "main.cpp":
#include "linalg.h" int main() { //... }in "linalg.h":
#ifndef _LINALG_H #define _LINALG_H #include "aligned_malloc.h" namespace linalg { void*(* const malloc)(size_t n) = &aligned_malloc16; void(* const free)(void *p) = &aligned_free16; // ... } #endifin "aligned_malloc.h": die Deklaration von aligned_malloc16 und aligned_free16
in "aligned_malloc.c": die Definition -"--> Fehler:
Linking...
main.obj : error LNK2001: unresolved external symbol "void __cdecl aligned_free16(void *)" (?aligned_free16@@YAXPAX@Z)
main.obj : error LNK2001: unresolved external symbol "void * __cdecl aligned_malloc16(unsigned int)" (?aligned_malloc16@@YAPAXI@Z)Liegts an mir, oder hab ich da durch die Umbenennung in linalg.h das build system von MSVC "überlistet"?
Falls ja, was tun?Vielen Dank schonmal...
C14