CFanatic

Go Back   CFanatic > Programming > C++ Programming

Join CFanatic Forum Now

question about so files topic posted under C++ Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 07-29-2007, 07:10 AM
Junior Member
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
ftom2 is on a distinguished road
| More
question about so files

hi,
i'm trying to create a shared object. the files i want to put in the shared object use a properties file to read some of the data. is there a way to include the properties file in the so file?
if not, then how do i refer the properties file from the classes in the shared object? (i want to refer to the relative path).
thanks.
Reply With Quote
  #2  
Old 08-18-2008, 02:28 AM
Senior Member
 
Join Date: Jul 2008
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
xpi0t0s is on a distinguished road
| More
Re: question about so files

You can include the relative path name of the file in the shared object as part of the object data. Just declare it at the top of one of your source files.

Alternatively if you want to include the file itself in the shared object that imples the file is unchanging. If this is the case just rewrite it as a data structure and declare it as before.

Code:
char *props_file="../../foo.properties";

void mySOfunc()
{
// ...
}
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing/reading 'records' to/from files. rpaul Introduce yourself 1 11-10-2007 12:10 PM
how to read txt files in unknown folders zl2k MFC Programming 1 07-16-2007 12:48 AM
C# debatable question MartijnMulder C# Programming 2 01-06-2007 12:42 AM
sorting question John C++ Programming 0 09-30-2006 04:57 AM
ShellExecute can't open files that WinExplorer can hsifelbmur MFC Programming 0 09-20-2006 03:20 AM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 04:24 PM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board