LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-08-2006, 05:06 PM   #1
fiveseven
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Rep: Reputation: 0
Linux C / C++ userland programming


Gday,

I've programmed with C++ and the W32 API for a few years, and in the last few days ive just started playing with linux for the first time. (im using ubuntu while i learn my way around.)

I can write console apps using STL no problem, but im lost when it comes to the linux system API. I know *of* the POSIX standard, but i figure linux must have its own API complimenting the POSIX calls. (i dont know anything about POSIX but id imagine it doesnt cover all aspects of dealing with the OS.)

If anyone can offer suggestions on books or online material covering linux from a Win32 programmers POV, that would be great.

Also, an immediate question about linux:
Is there an equivilent to WinAPI's MAX_PATH under linux? I'm unsure how long i can make a filename.

Best regards,
fiveseven
 
Old 08-08-2006, 06:12 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Two books that helped me a great deal:
1. 'Advanced Programming in the UNIX Environment' (2nd ed) by Stevens and Rago (Addison-Wesley)
2. 'Linux Programming' (3rd ed) by Mathew and Stones (Wrox)

The second book in particular goes beyond just the C/C++ API into the entire development environment/tools (ie: Make, gdb, valgrind, cvs, bitkeeper, etc etc...)

Quote:
Is there an equivilent to WinAPI's MAX_PATH under linux? I'm unsure how long i can make a filename.
AFAIK it is still (and forever will be) 255 chars...

Last edited by bulliver; 08-08-2006 at 06:16 PM.
 
Old 08-08-2006, 06:38 PM   #3
llmmix
Member
 
Registered: Jun 2005
Posts: 73

Rep: Reputation: 15
Code:
PATH_MAX 4096

Last edited by llmmix; 08-08-2006 at 06:39 PM.
 
Old 08-08-2006, 06:43 PM   #4
fiveseven
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks very much for your help guys, ill check out those two books asap

fiveseven
 
Old 08-08-2006, 10:00 PM   #5
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
PATH_MAX is defined in limits.h It is not necessarily always 4096. It is definitely machine dependent.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
userland tools for aacraid zatar042 Linux - Hardware 0 07-04-2006 10:58 PM
LXer: Linux: Tainting the Kernel From Userland LXer Syndicated Linux News 0 05-29-2006 11:54 PM
root file system on NFS... kernel vs. userland GUIPenguin Linux - General 0 03-22-2006 01:52 PM
Difference between Userland programming and Kernel Programming.. meetsagittarian Programming 1 02-20-2006 12:26 AM
userland memory to Ring 0 for boothing up linux McDe Programming 4 03-15-2005 10:02 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration