Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » Accessing Database from multiple files
Accessing Database from multiple files [message #21726] Tue, 02 June 2009 15:23 Go to previous message
jeremy_c is currently offline  jeremy_c
Messages: 175
Registered: August 2007
Location: Ohio, USA
Experienced Member
I am having a bit of problems coming up with either all my field names being either already defined:

main.obj : error LNK2005: "void __cdecl 
TABLE_SUPPLIER(class Upp::SqlSchema &)" 
(?TABLE_SUPPLIER@@YAXAAVSqlSchema@Upp@@@Z) already defined 
in base_data.obj


Or not defined:

C:\Develop\Projects\UppApps\BeekPRO\base_data.cpp(8) :
error C2065: 'HIVE_TYPE' : undeclared identifier


What I have is BeekPRO.h (only revelant portions):

#define SCHEMADIALECT <plugin/sqlite3/Sqlite3Schema.h>
#define MODEL <BeekPRO/BeekPRO.sch>

#include <Sql/sch_schema.h>
#include <Sql/sch_header.h>
#include <Sql/sch_source.h>


I've tried moving the sch_source.h include from BeekPRO.h to BeekPRO.cpp thinking that the sch_header.h was just the definitions but sch_source.h was the actual source but that is not making a difference.

What I want is to be able to access the schema data from many .cpp files, thus, I can take an application that is getting more complex every minute and break it into smaller manageable files:

* BeekPRO.cpp - main file
* Apiary.cpp - Add/Edit/Remove apiaries
* Hive.cpp - Add/Edit/Remove hives
* Supplier.cpp - Add/Edit/Remove suppliers
* ... etc ...

Jeremy
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: PATCH/BUGFIX Oracle asTable Failure - Solution
Next Topic: Application crashes when connected to MySQL, what am I doing wrong?
Goto Forum:
  


Current Time: Tue Dec 10 04:12:11 CET 2019

Total time taken to generate the page: 0.00886 seconds