Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #12212 > unrolled thread

Weird Resolved Linkage

Started byNephi Immortal <immortalnephi@gmail.com>
First post2011-12-08 10:29 -0800
Last post2011-12-09 09:21 +1300
Articles 2 — 2 participants

Back to article view | Back to comp.lang.c++


Contents

  Weird Resolved Linkage Nephi Immortal <immortalnephi@gmail.com> - 2011-12-08 10:29 -0800
    Re: Weird Resolved Linkage Ian Collins <ian-news@hotmail.com> - 2011-12-09 09:21 +1300

#12212 — Weird Resolved Linkage

FromNephi Immortal <immortalnephi@gmail.com>
Date2011-12-08 10:29 -0800
SubjectWeird Resolved Linkage
Message-ID<44d42ff8-2616-4ad8-bc06-beb5bfbf45da@32g2000yqp.googlegroups.com>
	I am working to edit many classes across many modules.  Many modules
depend on one header when they want to use built-in types like this
below.

// built_in_types.h
typedef char t_int8;
typedef short t_int16;
// etc

// module_1.h
#include “built_in_types.h”

// module_2.h
#include “built_in_types.h”

// module_3.h
#include “built_in_types.h”

// main.cpp
#include “built_in_types.h”
#include “module_1.h”
#include “module_2.h”
#include “module_3.h”

// etc….

	All modules are correct without errors.  If you modify
built_in_types.h, then all modules are required to be recompiled.
After you recompile for the first time, error message reports
unresolved linkage to all class functions in module_1.h or other
modules.  You don’t touch any modification before you recompiled
second time.  No resolved linkage reported.
	Very strange.  Have you experienced similar issue on Visual C++ 2010?

[toc] | [next] | [standalone]


#12214

FromIan Collins <ian-news@hotmail.com>
Date2011-12-09 09:21 +1300
Message-ID<9kckhjFi1tU3@mid.individual.net>
In reply to#12212
On 12/ 9/11 07:29 AM, Nephi Immortal wrote:
> 	I am working to edit many classes across many modules.  Many modules
> depend on one header when they want to use built-in types like this
> below.
>
> // built_in_types.h
> typedef char t_int8;
> typedef short t_int16;
> // etc

Why don't you just use the standard types in <stdint.h>?

-- 
Ian Collins

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.c++


csiph-web